#
# SConscript for building the MahJong-Night server.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 3 of the License.
#
# Author: VestniK (Sergey N.Vidyuk)
# Date: 18 Jun 2009
import os
from get_files import *

Import('BaseEnv')
# Creating main construction environment
server = BaseEnv.Clone()

# Defining build options
server.Append(CPPPATH = '.')
server.Append(CPPPATH = '#services')
server.EnableQt4Modules(["QtCore","QtNetwork","QtXml"])

# Setting up sources and builders
LibSources = get_files_list(".","\.cpp$",["moc_.*\.cpp$","mjnserver.cpp"])
LibSources += server.QRSService('#services/session.xml')
LibSources += server.QRSService('#services/player.xml')
LibSources += server.QRSService('#services/game.xml')
LibSources += ['#services/mjnconverters.cpp']
lib = server.Library("MjnSrv",LibSources)

mjn_server = server.Program('mjn-server',["mjnserver.cpp"],LIBS=[lib,'$LIBS'])

server.InstallProgram(mjn_server)

Return('lib')
